import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import Member from '@/components/Member'
import ShopCart from '@/components/ShopCart'
import Search from '@/components/Search'
import newsList from '@/components/news/newsList'
import newsDetail from '@/components/news/newsDetail'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'defualt',
      redirect: { name: 'home' }
    }, {
      path: '/home',
      name: 'home',
      component: Home
    },
    {
      path: '/member',
      name: 'member',
      component: Member
    }, {
      path: '/shopcart',
      name: 'shopcart',
      component: ShopCart
    }, {
      path: '/search',
      name: 'search',
      component: Search
    }, {
      path: '/news/list',
      name: 'newsList',
      component: newsList
    }, {
      path: '/news/detail/:newId',
      name: 'newsDetail',
      component: newsDetail
    }
  ],
  linkExactActiveClass: 'mui-active'
})
